package dingdan

type Model struct {
	ID                     int64   `json:"id" gorm:"column:id;primaryKey;autoIncrement;comment:订单ID"`
	Pid                    int     `json:"pid" gorm:"column:pid;not null;default:0;comment:父类订单id"`
	OrderId                string  `json:"order_id" gorm:"column:order_id;type:varchar(32);not null;default:'';comment:订单号"`
	TradeNo                string  `json:"trade_no" gorm:"column:trade_no;type:varchar(100);not null;default:'';comment:支付宝订单号"`
	Uid                    uint    `json:"uid" gorm:"column:uid;unsigned;not null;default:0;comment:用户id"`
	RealName               string  `json:"real_name" gorm:"column:real_name;type:varchar(32);not null;default:'';comment:用户姓名"`
	UserPhone              string  `json:"user_phone" gorm:"column:user_phone;type:varchar(18);not null;default:'';comment:用户电话"`
	UserAddress            string  `json:"user_address" gorm:"column:user_address;type:varchar(100);not null;default:'';comment:详细地址"`
	CartId                 string  `json:"cart_id" gorm:"column:cart_id;type:text;comment:购物车id"` // text 类型无需指定长度
	FreightPrice           float64 `json:"freight_price" gorm:"column:freight_price;type:decimal(12,2);not null;default:0.00;comment:运费金额"`
	TotalNum               uint    `json:"total_num" gorm:"column:total_num;unsigned;not null;default:0;comment:订单商品总数"`
	TotalPrice             float64 `json:"total_price" gorm:"column:total_price;type:decimal(12,2);unsigned;not null;default:0.00;comment:订单总价"`
	TotalPostage           float64 `json:"total_postage" gorm:"column:total_postage;type:decimal(12,2);unsigned;not null;default:0.00;comment:邮费"`
	PayPrice               float64 `json:"pay_price" gorm:"column:pay_price;type:decimal(12,2);unsigned;not null;default:0.00;comment:实际支付金额"`
	PayPostage             float64 `json:"pay_postage" gorm:"column:pay_postage;type:decimal(12,2);unsigned;not null;default:0.00;comment:支付邮费"`
	DeductionPrice         float64 `json:"deduction_price" gorm:"column:deduction_price;type:decimal(12,2);unsigned;not null;default:0.00;comment:抵扣金额"`
	CouponId               uint    `json:"coupon_id" gorm:"column:coupon_id;unsigned;not null;default:0;comment:优惠券id"`
	CouponPrice            float64 `json:"coupon_price" gorm:"column:coupon_price;type:decimal(12,2);unsigned;not null;default:0.00;comment:优惠券金额"`
	Paid                   uint8   `json:"paid" gorm:"column:paid;type:tinyint(1);unsigned;not null;default:0;comment:支付状态"`
	PayTime                int64   `json:"pay_time" gorm:"column:pay_time;unsigned;not null;default:0;comment:支付时间（时间戳）"`
	PayType                string  `json:"pay_type" gorm:"column:pay_type;type:varchar(32);not null;default:'';comment:支付方式"`
	AddTime                int64   `json:"add_time" gorm:"column:add_time;unsigned;not null;default:0;comment:创建时间（时间戳）"`
	Status                 int8    `json:"status" gorm:"column:status;type:tinyint(1);not null;default:0;comment:订单状态（-1:申请退款 -2:退货成功 0:待发货 1:待收货 2:已收货 3:待评价）"`
	IsStockUp              int8    `json:"is_stock_up" gorm:"column:is_stock_up;type:tinyint(1);not null;default:0;comment:是否备货中"`
	RefundStatus           uint8   `json:"refund_status" gorm:"column:refund_status;type:tinyint(1);unsigned;not null;default:0;comment:0未退款 1申请中 2已退款"`
	RefundType             int8    `json:"refund_type" gorm:"column:refund_type;type:tinyint(1);not null;default:0;comment:退款申请类型"`
	RefundExpress          string  `json:"refund_express" gorm:"column:refund_express;type:varchar(255);not null;default:'';comment:退货快递单号"`
	RefundExpressName      string  `json:"refund_express_name" gorm:"column:refund_express_name;type:varchar(255);not null;default:'';comment:退货快递名称"`
	RefundReasonWapImg     string  `json:"refund_reason_wap_img" gorm:"column:refund_reason_wap_img;type:varchar(2000);not null;default:'';comment:退款图片"`
	RefundReasonWapExplain string  `json:"refund_reason_wap_explain" gorm:"column:refund_reason_wap_explain;type:varchar(255);not null;default:'';comment:退款用户说明"`
	RefundReasonTime       int64   `json:"refund_reason_time" gorm:"column:refund_reason_time;unsigned;not null;default:0;comment:退款时间（时间戳）"`
	RefundReasonWap        string  `json:"refund_reason_wap" gorm:"column:refund_reason_wap;type:varchar(255);not null;default:'';comment:前台退款原因"`
	RefundReason           string  `json:"refund_reason" gorm:"column:refund_reason;type:varchar(255);not null;default:'';comment:不退款的理由"`
	RefundPrice            float64 `json:"refund_price" gorm:"column:refund_price;type:decimal(12,2);unsigned;not null;default:0.00;comment:退款金额"`
	DeliveryName           string  `json:"delivery_name" gorm:"column:delivery_name;type:varchar(64);not null;default:'';comment:快递名称/送货人姓名"`
	DeliveryCode           string  `json:"delivery_code" gorm:"column:delivery_code;type:varchar(50);not null;default:'';comment:快递公司编码"`
	DeliveryType           string  `json:"delivery_type" gorm:"column:delivery_type;type:varchar(32);not null;default:'';comment:发货类型"`
	DeliveryId             string  `json:"delivery_id" gorm:"column:delivery_id;type:varchar(64);not null;default:'';comment:快递单号/手机号"`
	KuaidiLabel            string  `json:"kuaidi_label" gorm:"column:kuaidi_label;type:varchar(255);not null;default:'';comment:快递单号图片"`
	KuaidiTaskId           string  `json:"kuaidi_task_id" gorm:"column:kuaidi_task_id;type:varchar(64);not null;default:'';comment:快递单任务id"`
	KuaidiOrderId          string  `json:"kuaidi_order_id" gorm:"column:kuaidi_order_id;type:varchar(64);not null;default:'';comment:快递单订单号"`
	FictitiousContent      string  `json:"fictitious_content" gorm:"column:fictitious_content;type:varchar(500);not null;default:'';comment:虚拟发货内容"`
	DeliveryUid            int     `json:"delivery_uid" gorm:"column:delivery_uid;not null;default:0;comment:配送员id"`
	GainIntegral           float64 `json:"gain_integral" gorm:"column:gain_integral;type:decimal(12,2);unsigned;not null;default:0.00;comment:消费赚取积分"`
	UseIntegral            float64 `json:"use_integral" gorm:"column:use_integral;type:decimal(12,2);unsigned;not null;default:0.00;comment:使用积分"`
	BackIntegral           float64 `json:"back_integral" gorm:"column:back_integral;type:decimal(12,2);unsigned;not null;default:0.00;comment:给用户退了多少积分"`
	SpreadUid              int     `json:"spread_uid" gorm:"column:spread_uid;not null;default:0;comment:推广人uid"`
	SpreadTwoUid           int     `json:"spread_two_uid" gorm:"column:spread_two_uid;not null;default:0;comment:上上级推广人uid"`
	OneBrokerage           float64 `json:"one_brokerage" gorm:"column:one_brokerage;type:decimal(12,2);not null;default:0.00;comment:一级返佣金额"`
	TwoBrokerage           float64 `json:"two_brokerage" gorm:"column:two_brokerage;type:decimal(12,2);not null;default:0.00;comment:二级返佣金额"`
	Mark                   string  `json:"mark" gorm:"column:mark;type:varchar(512);not null;default:'';comment:备注"`
	IsDel                  uint8   `json:"is_del" gorm:"column:is_del;type:tinyint(1);unsigned;not null;default:0;comment:是否删除"`
	IsCancel               uint8   `json:"is_cancel" gorm:"column:is_cancel;type:tinyint(1);unsigned;not null;default:0;comment:是否取消"`
	Unique                 string  `json:"unique" gorm:"column:unique;type:char(32);not null;default:'';uniqueIndex:unique;comment:唯一id(md5加密)类似id"`
	Remark                 string  `json:"remark" gorm:"column:remark;type:varchar(512);not null;default:'';comment:管理员备注"`
	MerId                  uint    `json:"mer_id" gorm:"column:mer_id;unsigned;not null;default:0;comment:商户ID"`
	IsMerCheck             uint8   `json:"is_mer_check" gorm:"column:is_mer_check;type:tinyint(3);unsigned;not null;default:0;comment:商户上传"`
	CombinationId          uint    `json:"combination_id" gorm:"column:combination_id;unsigned;not null;default:0;comment:拼团商品id0一般商品"`
	PinkId                 uint    `json:"pink_id" gorm:"column:pink_id;unsigned;not null;default:0;comment:拼团id 0没有拼团"`
	Cost                   float64 `json:"cost" gorm:"column:cost;type:decimal(12,2);unsigned;not null;default:0.00;comment:成本价"`
	SeckillId              uint    `json:"seckill_id" gorm:"column:seckill_id;unsigned;not null;default:0;comment:秒杀商品ID"`
	BargainId              uint    `json:"bargain_id" gorm:"column:bargain_id;unsigned;not null;default:0;comment:砍价id"`
	AdvanceId              int     `json:"advance_id" gorm:"column:advance_id;not null;default:0;comment:预售商品id"`
	VerifyCode             string  `json:"verify_code" gorm:"column:verify_code;type:varchar(12);not null;default:'';comment:核销码"`
	StoreId                int     `json:"store_id" gorm:"column:store_id;not null;default:0;comment:门店id"`
	ShippingType           int8    `json:"shipping_type" gorm:"column:shipping_type;type:tinyint(1);not null;default:1;comment:配送方式 1=快递 ，2=门店自提"`
	ClerkId                int     `json:"clerk_id" gorm:"column:clerk_id;not null;default:0;comment:店员id"`
	IsChannel              uint8   `json:"is_channel" gorm:"column:is_channel;type:tinyint(1);unsigned;not null;default:0;comment:支付渠道(0微信公众号1微信小程序)"`
	IsRemind               uint8   `json:"is_remind" gorm:"column:is_remind;type:tinyint(1);unsigned;not null;default:0;comment:消息提醒"`
	IsSystemDel            int8    `json:"is_system_del" gorm:"column:is_system_del;type:tinyint(1);not null;default:0;comment:后台是否删除"`
	ChannelType            string  `json:"channel_type" gorm:"column:channel_type;type:varchar(255);not null;default:'';comment:用户访问端标识"`
	Province               string  `json:"province" gorm:"column:province;type:varchar(255);not null;default:'';comment:用户省份"`
	ExpressDump            string  `json:"express_dump" gorm:"column:express_dump;type:varchar(502);not null;default:'';comment:订单面单打印信息"`
	VirtualType            int8    `json:"virtual_type" gorm:"column:virtual_type;type:tinyint(1);not null;default:0;comment:虚拟商品类型"`
	VirtualInfo            string  `json:"virtual_info" gorm:"column:virtual_info;type:varchar(255);not null;default:'';comment:虚拟商品信息"`
	PayUid                 int     `json:"pay_uid" gorm:"column:pay_uid;not null;default:0;comment:支付用户uid"`
	CustomForm             string  `json:"custom_form" gorm:"column:custom_form;type:text;comment:自定义表单"`
	StaffId                int     `json:"staff_id" gorm:"column:staff_id;not null;default:0;comment:员工id"`
	AgentId                int     `json:"agent_id" gorm:"column:agent_id;not null;default:0;comment:代理id"`
	DivisionId             int     `json:"division_id" gorm:"column:division_id;not null;default:0;comment:事业部id"`
	StaffBrokerage         float64 `json:"staff_brokerage" gorm:"column:staff_brokerage;type:decimal(12,2);not null;default:0.00;comment:员工返佣"`
	AgentBrokerage         float64 `json:"agent_brokerage" gorm:"column:agent_brokerage;type:decimal(12,2);not null;default:0.00;comment:代理返佣"`
	DivisionBrokerage      float64 `json:"division_brokerage" gorm:"column:division_brokerage;type:decimal(12,2);not null;default:0.00;comment:事业部返佣"`
	IsGift                 int     `json:"is_gift" gorm:"column:is_gift;type:int(1);not null;default:0;comment:是否礼品订单"`
	GiftPrice              float64 `json:"gift_price" gorm:"column:gift_price;type:decimal(12,2);not null;default:0.00;comment:礼品附加费"`
	GiftUid                int     `json:"gift_uid" gorm:"column:gift_uid;not null;default:0;comment:接受礼品用户uid"`
	GiftMark               string  `json:"gift_mark" gorm:"column:gift_mark;type:varchar(255);not null;default:'';comment:礼物留言"`
}

func (Model) TableName() string {
	return "a_store_order"
}
